﻿using MVVM;
using System.Configuration;
using System.Data;
using System.Text;
using System.Windows;

namespace WebView.Demo
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            AppContext.SetSwitch("Switch.System.Windows.Media.EnableHardwareAccelerationInRdp", true);//开启RDP
        }

        protected override void OnStartup(StartupEventArgs e)
        {
            //设置当前程序集
            this.ShutdownMode = ShutdownMode.OnMainWindowClose;

            //注册EncodingProvider实现对中文编码的支持
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            //解决绑定浮点类型不能输入浮点数问题
            FrameworkCompatibilityPreferences.KeepTextBoxDisplaySynchronizedWithTextProperty = false;

            this.RegistUnhandledExceptionHandle();
            base.OnStartup(e);
        }
    }

}
